package prueba.principal.listeners;

import java.io.IOException;

import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.event.ActionListener;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import prueba.principal.util.CheckSession;

public class ActionListenerImpl implements ActionListener{

	

	public void processAction(ActionEvent event) throws AbortProcessingException {
		
		if(CheckSession.sessionValid()){
			//Es valida
		}else{
			try {
				
				FacesContext.getCurrentInstance().getExternalContext().redirect("expire.jsp");


				
				
			} catch (IOException e) {
				
				e.printStackTrace();
			}
		}
		
	}

}
